![]() |
KCGetAttribute |
||||
Header: | Keychain.h | Carbon status: | Under Evaluation | |
Retrieves attribute data from a keychain item.
OSStatus KCGetAttribute ( KCItemRef item, KCAttribute *attr, UInt32 *actualLength );
A reference to the keychain item whose attribute data you wish to modify.
A pointer to a structure containing the keychain item attribute data you wish to obtain. Before calling KCGetAttribute, you should set the tag field to a tag identifying the attribute to get, the length field to the maximum length of the data buffer pointed to by data, and the data field to a pointer to a buffer of sufficient length for the type of data to be returned. On return, the data field contains the requested attribute data.
The actual length of the attribute data.
A result code. The result code errKCInvalidItemRef indicates that the specified keychain item reference was invalid. The result code errKCNoSuchAttr indicates that you tried to set an attribute which is undefined for this item class. The result code errKCBufferTooSmall indicates that your application must allocate a new buffer of sufficient size before calling KCGetAttribute again.
You can call the KCGetAttribute function to retrieve attribute data from a keychain item. Standard item attributes which can be retrieved include attributes defined by the constants kClassKCItemAttr, kCreationDateKCItemAttr, kModDateKCItemAttr, kDescriptionKCItemAttr, kCommentKCItemAttr, kLabelKCItemAttr, kCreatorKCItemAttr, kScriptCodeKCItemAttr, and kCustomIconKCItemAttr. See
Available beginning with Keychain Manager 1.0.
Under evaluation for Carbon. Available in CarbonLib 1.0 and later when KeychainLib 1.0 or later is installed. Exported by CarbonLib 1.0 and later and by KeychainLib 1.0 and later.
© 2000 Apple Computer, Inc. — (Last Updated 4/14/2000)